home *** CD-ROM | disk | FTP | other *** search
- Path: news.clark.net!not-for-mail
- From: eamick@clark.net (Eric Amick)
- Newsgroups: comp.std.c
- Subject: Re: Bit-field sizes
- Date: 18 Mar 1996 02:06:01 GMT
- Organization: the end of my rope
- Distribution: world
- Message-ID: <4iige9$5g@clarknet.clark.net>
- References: <nzRPxQ9ytZZA084yn@csn.net> <4hkgds$bbh@info1.sdrc.com> <4ho846$g2d@usenet.pa.dec.com> <4hpkcv$gjc@info1.sdrc.com> <827022001snz@genesis.demon.co.uk>
- NNTP-Posting-Host: explorer.clark.net
- Mime-Version: 1.0
- Content-Type: TEXT/PLAIN; charset=ISO-8859-1
- Content-Transfer-Encoding: 8bit
- X-Newsreader: TIN [UNIX 1.3 950726BETA PL0]
-
- Lawrence Kirby (fred@genesis.demon.co.uk) wrote:
- >There is a curious case here however. Lets say (with reference to 6.5.2.1)
- >I declare:
- >
- >struct bit {
- > long field : CHAR_BIT*sizeof(long) + 1;
- >};
- >
- >This results in undefined behaviour due to the long type of the declarator.
- >However a constraint is also violated due to the field width. Is a diagnostic
- >still required in this case or can the compiler omit it as a form of undefined
- >behaviour?
-
- TC1 requires all constraint violations to be diagnosed, even if undefined
- behavior is involved.
-
- --
- Eric Amick eamick@clark.net
- Columbia, MD Public key available via finger
-